//
//  WBB_AlertView.h
//  QRCodeCar
//
//  Created by mac on 16/11/24.
//  Copyright © 2016年 desn. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

typedef void (^sureButtonClickBlock)(NSString *str);

@interface WBB_AlertView : NSObject


@property (nonatomic, copy) sureButtonClickBlock sureBlock;







/**
 普通的alertView

 @param viewController 要展示的view
 @param title title
 @param message message
 @param sureButtonClick 确定回调方法
 @param canselButtonCick 取消回调方法
 */
+ (void)showAlertViewOnViewController:(UIViewController *)viewController title:(NSString *)title message:(NSString *)message  sureButtonClick:(void (^)())sureButtonClick canselButtonClick:(void(^)()) canselButtonCick;



    
/**
 alertView 自定义 确定和取消按钮文字
 
 @param viewController 在哪个控制器弹出
 @param title title
 @param message message
 @param sureTitle 确定titel
 @param canseltitle 取消title
 @param sureButtonClick 确定回调方法
 @param canselButtonCick 取消回调方法
 */
+ (void)showAlertViewOnViewController:(UIViewController *)viewController title:(NSString *)title message:(NSString *)message  sureButtonTitle:(NSString *)sureTitle canselButtonTitle:(NSString *)canseltitle sureButtonClick:(void (^)())sureButtonClick canselButtonClick:(void(^)()) canselButtonCick;



/**
 弹出视图 带有输入框
 
 使用这个方法,只能把该类作为 vc 的属性来调用 否则无效
 
 @param vc 控制器
 @param title 标题
 @param message 描述
 @param placeholder 提示输入
 @param sure 回调
 */
- (void)showTextAlertControllerOnViewController:(UIViewController *)vc title:(NSString *)title message:(NSString *)message placeHolder:(NSString *)placeholder sureBlock:(sureButtonClickBlock)sure;


/**
 弹出alertController
 
 @param title 标题
 @param message 消息
 @param style alertView or actionsheet
 @param buttonTitles 标题数组
 @param buttonActions 事件数组
 */
+ (void)showWithTitle:(NSString *)title
              message:(NSString *)message
                style:(UIAlertControllerStyle)style
           showCancle:(BOOL)showCancle
         buttonTitles:(NSArray <NSString *>*)buttonTitles
        buttonActions:(NSArray *)buttonActions;


/**
 弹出 sheet 形式的弹出框

 @param viewController 控制器
 @param title 标题
 @param message 说明
 @param sheetArr 内容数组
 @param complete 回调
 */
+ (void)showSheetAlertViewWithViewController:(UIViewController *)viewController Title:(NSString *)title message:(NSString *)message sheetTitleArr:(NSArray *)sheetArr complete:(void (^)(NSInteger index))complete;

@end
